<?php // no direct access
defined('_JEXEC') or die('Restricted access'); ?>
<?php if($type == 'logout') : ?>

<form action="index.php" method="post" name="login" id="form-login">
        <?php if ($params->get('greeting')) : ?>
        <div class="logout">
                <span><?php echo JText::sprintf( 'HINAME', $user->get('name') ); ?></span>
                <?php endif; ?>
                <input type="submit" name="Submit" class="button" value="<?php echo JText::_( 'BUTTON_LOGOUT'); ?>" />
        </div>
        <input type="hidden" name="option" value="com_user" />
        <input type="hidden" name="task" value="logout" />
        <input type="hidden" name="return" value="<?php echo $return; ?>" />
</form>
<?php else : ?>
<?php if(JPluginHelper::isEnabled('authentication', 'openid')) : ?>
<?php JHTML::_('script', 'openid.js'); ?>
<?php endif; ?>
<form action="<?php echo JRoute::_( 'index.php', true, $params->get('usesecure')); ?>" method="post" name="form-login" id="form-login" >
						<ul><li>
                        <input id="modlogin_username" type="text" name="username" value="<?php echo JText::_('USERNAME'); ?>"  onblur="if(this.value=='') this.value='<?php echo JText::_('USERNAME');?>'" onfocus="if(this.value=='<?php echo JText::_('USERNAME'); ?>') this.value='';" class="inputbox" alt="username" size="15" />&nbsp;&nbsp;
                        <input id="modlogin_passwd" type="password" name="passwd" value="<?php echo JText::_('PASSWORD'); ?>" onblur="if(this.value=='') this.value='<?php echo JText::_('PASSWORD'); ?>'" onfocus="if(this.value=='<?php echo JText::_('PASSWORD'); ?>') this.value='';" class="inputbox" size="15" alt="password" />&nbsp;&nbsp;
                <?php if(JPluginHelper::isEnabled('system', 'remember')) : ?>
                        <label for="modlogin_remember"><?php echo JText::_('Remember me') ?></label>&nbsp;&nbsp;
                        <input id="modlogin_remember" type="checkbox" name="remember" class="inputbox" value="yes" alt="Remember Me" />&nbsp;&nbsp;
                <?php endif; ?>
						<input type="submit" name="Submit" class="button" value="<?php echo JText::_('LOGIN') ?>" />&nbsp;&nbsp;

                        <a href="<?php echo JRoute::_( 'index.php?option=com_user&view=reset' ); ?>">
                                <?php echo JText::_('FORGOT_YOUR_PASSWORD'); ?></a>&nbsp;&nbsp;
						<a href="<?php echo JRoute::_( 'index.php?option=com_user&view=remind' ); ?>">
                                <?php echo JText::_('FORGOT_YOUR_USERNAME'); ?></a>&nbsp;&nbsp;
                <?php
		$usersConfig = &JComponentHelper::getParams( 'com_users' );
		if ($usersConfig->get('allowUserRegistration')) : ?>
                        <a href="<?php echo JRoute::_( 'index.php?option=com_user&task=register' ); ?>">
                                <?php echo JText::_('REGISTER'); ?></a></li></ul>
                <?php endif; ?>
        <input type="hidden" name="option" value="com_user" />
        <input type="hidden" name="task" value="login" />
        <input type="hidden" name="return" value="<?php echo $return; ?>" />
        <?php echo JHTML::_( 'form.token' ); ?>
</form>
<?php endif; ?>
